<?php

include 'islogin.php';

include '../config.php';



  if(isset($_POST['name']))

  {

  		$sql = "update en_basicinfo set name='".$_POST['name']."',advice='".$_POST['advice']."',par='".$_POST['par']."',suppor='".$_POST['suppor']."',sales='".$_POST['sales']."'";

  		

  		mysql_query($sql);

  		echo "<script>alert('修改成功');</script>";

  }

?>

<link href="images/skin.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">
	function save()

	{

		 if(confirm("是否提交修改内容?"))

		 {

			 document.form1.submit();

		 }

	}
</script>

<table width="100%" border="0" cellpadding="0" cellspacing="0">

  <tr>

    <td width="17" valign="top" background="images/mail_leftbg.gif"><img src="images/left-top-right.gif" width="17" height="29" /></td>

    <td valign="top" background="images/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">

      <tr>

        <td height="31"><div class="titlebt">基本设置</div></td>

      </tr>

    </table></td>

    <td width="16" valign="top" background="images/mail_rightbg.gif"><img src="images/nav-right-bg.gif" width="16" height="29" /></td>

  </tr>

  

  <tr>

    <td valign="middle" background="images/mail_leftbg.gif">&nbsp;</td>

    <td valign="top" bgcolor="#F7F8F9"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">

      <tr>

        <td colspan="2" valign="top">&nbsp;</td>

        <td>&nbsp;</td>

        <td valign="top">&nbsp;</td>

      </tr>

   

      <tr>

        <td colspan="2">&nbsp;</td>

        <td>&nbsp;</td>

        <td>&nbsp;</td>

      </tr>

      <?php 

      

         $sql="select name,advice,par,suppor,sales from en_basicinfo";

         $result = mysql_query($sql);

          $row = mysql_fetch_array($result);

      ?>

        <form name="form1" method="post" action="basicset.php">

	   		<tr>

	   		   <td width="20%" height="30" align="right" bgcolor="#f2f2f2" class="left_txt2">公司名称：</td>

	                <td width="3%" bgcolor="#f2f2f2">&nbsp;</td>

	                <td width="32%" height="30" bgcolor="#f2f2f2"><input name="name" type="text" id="title" size="30" value="<?php echo $row['name']?>" /></td>

	                <td width="45%" height="30" bgcolor="#f2f2f2" class="left_txt">显示在网站底部</td>

	   		</tr>

	   		

	   		<tr>

	   		   <td width="20%" height="30" align="right" bgcolor="#f2f2f2" class="left_txt2">投诉邮箱：</td>

	                <td width="3%" bgcolor="#f2f2f2">&nbsp;</td>

	                <td width="32%" height="30" bgcolor="#f2f2f2"><input name="advice" type="text" id="title" size="30" value="<?php echo $row['advice']?>" /></td>

	                <td width="45%" height="30" bgcolor="#f2f2f2" class="left_txt">投诉建议的接收邮箱</td>

	   		</tr>

	   		

	   		<tr>

	   		   <td width="20%" height="30" align="right" bgcolor="#f2f2f2" class="left_txt2">商务合作邮箱：</td>

	                <td width="3%" bgcolor="#f2f2f2">&nbsp;</td>

	                <td width="32%" height="30" bgcolor="#f2f2f2"><input name="par" type="text" id="title" size="30" value="<?php echo $row['par']?>" /></td>

	                <td width="45%" height="30" bgcolor="#f2f2f2" class="left_txt">商务合作邮箱</td>

	   		</tr>

	   		

	   		<tr>

	   		   <td width="20%" height="30" align="right" bgcolor="#f2f2f2" class="left_txt2">技术支持邮箱：</td>

	                <td width="3%" bgcolor="#f2f2f2">&nbsp;</td>

	                <td width="32%" height="30" bgcolor="#f2f2f2"><input name="suppor" type="text" id="title" size="30" value="<?php echo $row['suppor']?>" /></td>

	                <td width="45%" height="30" bgcolor="#f2f2f2" class="left_txt">技术支持邮箱</td>

	   		</tr>

	   		

	   		<tr>

	   		   <td width="20%" height="30" align="right" bgcolor="#f2f2f2" class="left_txt2">邮购产品邮箱：</td>

	                <td width="3%" bgcolor="#f2f2f2">&nbsp;</td>

	                <td width="32%" height="30" bgcolor="#f2f2f2"><input name="sales" type="text" id="sales" size="30" value="<?php echo $row['sales']?>" /></td>

	                <td width="45%" height="30" bgcolor="#f2f2f2" class="left_txt">邮购产品邮箱</td>

	   		</tr>

   		</form>

      <tr><!-- 分割线 -->

        <td height="40" colspan="4"><table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">

          <tr>

            <td></td>

          </tr>

        </table></td>

      </tr>

   		<tr><td><input type="button" value="保存" onclick="save()" /></td></tr>

    </table></td>

    <td background="images/mail_rightbg.gif">&nbsp;</td>

  </tr>

  <tr>

    <td valign="bottom" background="images/mail_leftbg.gif"><img src="images/buttom_left2.gif" width="17" height="17" /></td>

    <td background="images/buttom_bgs.gif"><img src="images/buttom_bgs.gif" width="17" height="17"></td>

    <td valign="bottom" background="images/mail_rightbg.gif"><img src="images/buttom_right2.gif" width="16" height="17" /></td>

  </tr>

</table>